package com.coolingme.notandor.expression;

import com.coolingme.notandor.IExpression;

/**
 * 单关键词终结符表达式
 *
 * @author wangyue
 * @date 2022/12/25 11:08
 */
public class KeywordExpression implements IExpression {

    private String keyword;

    public KeywordExpression(String keyword) {
        this.keyword = keyword;
    }

    @Override
    public Boolean interpret(String content) {
        boolean contains = content.contains(this.keyword);
        return contains;
    }

}
